{#

/**
 * Array by column
 *
 * @var $anscount
 * @var $cellwidth
 */
 #}
 <!-- Array by column -->

 <!-- answer -->
 <div class="ls-table-wrapper" role="group" aria-labelledby="ls-question-text-{{ basename }}">
    <table class="{{ coreClass }} table table-bordered table-col-hover">
        <colgroup>
            <col class="col-answers" style='width: {{ answerwidth }}%;' />
            <!-- @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/ -->
            {% for i, question in aQuestions %}
                <col
                    class="answers-list radio-list {% if i % 2 %}ls-odd{% else %}ls-even{% endif %} {% if question.errormandatory %} ls-error-mandatory has-error{% endif %}"
                    style='width: {{ cellwidth }}%;'
                    role="radiogroup"
                    aria-labelledby="answertext{{ question.myfname }}"
                    >
            {% endfor %}
        </colgroup>
        <thead><!-- The global concept is hard to understand : must control if aria-labelledby for radiogroup is OK and if we can add aria-hidden here -->
            <tr class='ls-heading'><!-- unsure for ls-heading class here -->
                <td></td>
                {% for i, question in aQuestions %}
                    <th
                        id="answertext{{ question.myfname }}"
                        class="answertext control-label {% if question.errormandatory %} has-error error-mandatory{% endif %}"
                        role="columnheader"
                    >
                        {{ processString(question.question) }}
                    </th>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
            {% for ansrow in labels %}
                <tr id="javatbd{{ ansrow.myfname }}" class="answers-list">
                    <th id="label-{{ ansrow.code }}" class="answertext{% if answerwidth==0 %} visually-hidden{% endif %}">
                        {{ processString(ansrow.answer) }}
                    </th>
                    {% for i, ld in anscode %}
                        <td class="answer_cell_{{ ld }}{% if ansrow.code=="" %} noanswer-item{% endif %} answer-item radio-item">
                                <input
                                    type="radio"
                                    name="{{ aQuestions[i].myfname }}"
                                    value="{{ ansrow.code }}"
                                    id="answer{{ aQuestions[i].myfname }}-{{ ansrow.code }}"
                                    aria-labelledby="label-{{ ansrow.code }}"
                                    {{ checked[ansrow.code][ld] }}
                                     />
                                <label class="ls-label-xs-visibility " for="answer{{ aQuestions[i].myfname }}-{{ ansrow.code }}" aria-hidden="true">
                                    {{ processString(aQuestions[i].question) }}
                                </label>
                        </td>
                    {% endfor %}
                </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% for i, ld in anscode %}
    {{ C.Html.hiddenField("java"~aQuestions[i].myfname,aQuestions[i].myfname_value,({
        'id' : "java"~aQuestions[i].myfname,
        'disabled' : true,
    }))
    }}
{% endfor %}

<!-- end of answer -->
